package com.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * API网关启动类
 * 使用Consul作为服务注册中心
 */
@SpringBootApplication
@EnableDiscoveryClient
public class GatewayApplication {

    public static void main(String[] args) {
        // 禁用Eureka
        // System.setProperty("spring.cloud.service-registry.auto-registration.enabled", "false"); // 允许服务自动注册
        System.setProperty("eureka.client.enabled", "false");
        SpringApplication.run(GatewayApplication.class, args);
    }

}
